home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1992 June: ROMin Holiday / ADC Developer CD (1992-06) (''ROMin Holiday'')_iso / Developer Connection - 06-1992.iso / Tools & Apps / Localization Tools / SCM Verifier 1.0a12 / install < prev    next >
Encoding:
Text File  |  1990-07-03  |  4.4 KB  |  159 lines  |  [TEXT/MPS ]

  1. #
  2. #    File: Install, MPW Shell script
  3. #    Author: Malcolm H. Teas   Apple Computer, Inc.   SCM
  4. #    Creation Date: 11/28/88
  5. #
  6. #    Modified by Kerry Laidlaw    2/7/90
  7. #        Changed names to avoid confusion with prior tool.
  8. #
  9. #    Function:
  10. #    Install or uninstall the Localization Verifier into a user's system.
  11. #
  12. #    In-Outputs:
  13. #    None.
  14. #
  15. #    Notes:
  16. #    In the 1.0b2 release, the removal feature in the UserStartup script
  17. #    deliberatly uses the wrong spelling for Auditor "-er".  It also duplicates
  18. #    this with the correct spelling. This is so it can remove the old Auditer.
  19. #    This will have to be changed in the future.
  20. #
  21.  
  22. #     Save the value of some MPW globals, restore at the end.
  23. set save-exit {exit}
  24. set exit 0
  25. set save-echo {echo}
  26. set echo 0                    # Set this to 1 for debugging.
  27.  
  28. #    Find out if we're installing or removing.
  29. if "`exists -f "{MPW}Scripts:verify-menu"`"
  30. #    We should be removing. Ask about un-installation.
  31.     Confirm "Do you want to remove the Localization Verifier?"
  32.     if {status} != 0            # The cancel button
  33.         set exit {save-exit}
  34.         set echo {save-echo}
  35.         exit 2
  36.     end
  37.     
  38.     #    Destroy the files.
  39.     delete -p "{MPW}Scripts:verify-menu"
  40.     delete -p "{MPW}Scripts:check-disk"
  41.     delete -p "{MPW}Scripts:compare-disks"
  42.     delete -p "{MPW}Scripts:makelist"
  43.     delete -p "{MPW}Interfaces:RIncludes:newtypes.r"
  44.     delete -p "{MPW}Tools:resDiff"        
  45.     delete -p "{MPW}Tools:create.rnamefile"        # *kl*
  46.  
  47.     
  48.     #    Remove the menu.
  49.     deletemenu "verify"
  50.     echo "Removing the Localization Verifier menu command from your UserStartup file..."
  51.     open "{ShellDirectory}UserStartup"
  52.     find • "{ShellDirectory}UserStartup"
  53.     loop
  54.         clear "/•∂n#∂tMake the menu for the Localization Verifier.∞/" "{ShellDirectory}UserStartup"
  55.         if {status} != 0
  56.             break
  57.         end
  58.         clear "/•∂nverify-menu∞/" "{ShellDirectory}UserStartup"
  59.         if {status} != 0
  60.             break
  61.         end
  62.     end
  63.     loop
  64.         clear "/•∂n#∂tMake the menu for the Localization Verifier.∞/" "{ShellDirectory}UserStartup"
  65.         if {status} != 0
  66.             break
  67.         end
  68.         clear "/•∂nverify-menu∞/" "{ShellDirectory}UserStartup"
  69.         if {status} != 0
  70.             break
  71.         end
  72.     end
  73.     close -y "{ShellDirectory}UserStartup"
  74.         
  75.     #    Restore the state of the world and exit.
  76.     echo "∂n∂tDone!∂n"
  77.     set exit {save-exit}
  78.     set echo {save-echo}
  79.     exit 0
  80. end
  81.  
  82. #    Ask about installation.
  83. Confirm "Do you want to install the Localization Verifier?"
  84. if {status} != 0            # The cancel button
  85.     set exit {save-exit}
  86.     set echo {save-echo}
  87.     exit 2
  88. end
  89. #    Check the files.
  90. if !"`exists -f "verify-menu"`"
  91.     alert "Missing the file verify-menu,∂nrestart from the correct directory."
  92.     set exit {save-exit}
  93.     set echo {save-echo}
  94.     exit 2
  95. end
  96. if !"`exists -f "check-disk"`"
  97.     alert "Missing the file check-disk,∂nrestart from the correct directory."
  98.     set exit {save-exit}
  99.     set echo {save-echo}
  100.     exit 2
  101. end
  102. if !"`exists -f "compare-disks"`"
  103.     alert "Missing the file compare-disks,∂nrestart from the correct directory."
  104.     set exit {save-exit}
  105.     set echo {save-echo}
  106.     exit 2
  107. end
  108. if !"`exists -f "makelist"`"
  109.     alert "Missing the file makelist,∂nrestart from the correct directory."
  110.     set exit {save-exit}
  111.     set echo {save-echo}
  112.     exit 2
  113. end
  114. if !"`exists -f "newtypes.r"`"
  115.     alert "Missing the file newtypes.r,∂nrestart from the correct directory."
  116.     set exit {save-exit}
  117.     set echo {save-echo}
  118.     exit 2
  119. end
  120. if !"`exists -f "resDiff"`"
  121.     alerts "Missing the file resDiff,∂nrestart from the correct directory."
  122.     set exit {save-exit}
  123.     set echo {save-echo}
  124.     exit 2
  125. end
  126. if !"`exists -f "create.rnamefile"`"
  127.     alerts "Missing the file create.rnamefile,∂nrestart from the correct directory."
  128.     set exit {save-exit}
  129.     set echo {save-echo}
  130.     exit 2
  131. end
  132. if !"`exists -f "catinfo"`"
  133.     alert "Missing the file catinfo,∂nrestart from the correct directory."
  134.     set exit {save-exit}
  135.     set echo {save-echo}
  136.     exit 2
  137. end
  138.     
  139. #    Get the files from the floppy and put them into their new homes.
  140. duplicate -c -p "verify-menu"            "{MPW}Scripts:"
  141. duplicate -c -p "check-disk"            "{MPW}Scripts:"
  142. duplicate -c -p "compare-disks"            "{MPW}Scripts:"
  143. duplicate -c -p "makelist"                "{MPW}Scripts:"
  144. duplicate -c -p "newtypes.r"            "{MPW}Interfaces:RIncludes:"
  145. duplicate -c -p "resDiff"                "{MPW}Tools:"
  146. duplicate -c -p "create.rnamefile"        "{MPW}Tools:"
  147. duplicate -c -p "catinfo"                "{MPW}Tools:"
  148.     
  149. #    Add the new menu.
  150. echo "Adding the menu command to your UserStartup file..."
  151. echo "#∂tMake the menu for the Localization Verifier."  >> "{ShellDirectory}UserStartup"
  152. echo "verify-menu"  >> "{ShellDirectory}UserStartup"
  153. verify-menu        # Make the menu right now too.
  154.  
  155. #    Restore the state of the world and exit.
  156. echo "∂n∂tDone!∂n"
  157. set exit {save-exit}
  158. set echo {save-echo}
  159. exit 0